# 导入selenium
import time
from selenium import webdriver

DRIVER_PATH = './phantomjs.exe'
BROWSER = webdriver.PhantomJS(DRIVER_PATH)

TARGET_URL = 'https://www.baidu.com/'
BROWSER.get(TARGET_URL)

BROWSER.save_screenshot('baidu.png')
time.sleep(2)

inputEl = BROWSER.find_element_by_id('kw')
inputEl.send_keys('昆凌')
time.sleep(3)

BROWSER.save_screenshot('昆凌搜素结果.png')


